import {  Modal } from 'antd';
import QueryAuthor from "../queryAuthor";
import SelectAuthorList from "../selectAuthorList";

const SelectAuthor = ({isAuthorModalOpen,setIsAuthorModalOpen,author,setAuthor}) => {

    const handleOk = () => {
        setIsAuthorModalOpen(false);
    };

    const handleCancel = () => {
        setIsAuthorModalOpen(false);
    };

    return <Modal title="Basic Modal" destroyOnClose={true} open={isAuthorModalOpen} onOk={handleOk} onCancel={handleCancel} width={'60%'} okText={'确定'} cancelText={'取消'}>
        <QueryAuthor></QueryAuthor>
        <SelectAuthorList author={author} setAuthor={setAuthor}></SelectAuthorList>
    </Modal>
}
export default SelectAuthor